package controller;

import java.io.IOException;
import java.util.Enumeration;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.CategoriasDao;
import dao.CategoriasDaoImpl;

@WebServlet("/excluircategoria")
public class ExcluirCategoriaServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    public ExcluirCategoriaServlet() {
        super();
    }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		processRequest(request, response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		processRequest(request, response);
	}

	@SuppressWarnings("unused")
	protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		CategoriasDao cDao = new CategoriasDaoImpl();
//		String saida = cDao.excluiCategorias(cat, p);
		Enumeration allParameterNames = request.getParameterNames();
		while(allParameterNames.hasMoreElements()){
			System.out.println(allParameterNames.nextElement().toString());
		}
	}
}
